import axios from "@/utils/require"
export function login(params: { loginname: string, password: string; }) {
//    发送请求进行登入
return axios({
    url:"/user/login",
    method:"post",
    data:params
})
}
// 校验手机号码是否被注册过  
export function checkPhone(data:{tel:string}) {
return axios({
    url:"/user/docheckphone",
    method:"post",
    data,
})
}
// 发送验证码
export function dosendCode(data:{tel:string}) {
return axios({
    url:"/user/dosendmsgcode",
    method:"post",
    data,
})
}
// 校验验证码
export function docheckcode(data: { tel: string, telcode: string }) {
return axios({
    url:"/user/docheckcode",
    method:"post",
    data,
})
}
// 校验密码
export function dofinishregister(data: { tel: string, password: string }) {
	// http://localhost:3001/api/user/login
	return axios({
		url: "/user/dofinishregister",
		method: "post",
		data
	})
}